<%@ page import="com.liliya.service.impl.UserServiceImpl" %>
<%@ page import="com.liliya.service.UserService" %>
<%@ page import="com.liliya.pojo.User" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Map" %>
<%@ page import="java.util.Set" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/1/4
  Time: 18:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <title>删除用户</title>
    <style>

        .blue_text {
            width: 100px;
            background: rgb(112, 144, 183);
        }

        table, tr, td {
            border: 1px solid rgb(152, 194, 193);
            text-align: center;
        }

        td {
            padding: 9px;
        }

        table {
            margin: auto;
            margin-bottom: 70px;
            width: 650px;
        }

        .main {
            border: 2px solid #34f0ff;
        }

    </style>
</head>
<body>

<div style="width: 760px" class="main">
    <%@ include file="../common/header.jsp" %>
    <div style="margin: 10px 20px">
        <img src="${pageContext.request.contextPath}/img/user.gif" alt="用户管理">
    </div>
    <div>
        <a href="${pageContext.request.contextPath}/admin/userdel?pageNum=1">首页</a>
        <a href="${pageContext.request.contextPath}/admin/userdel?pageNum=${pre}">上一页</a>
        <a href="${pageContext.request.contextPath}/admin/userdel?pageNum=${next}">下一页</a>
        <a href="${pageContext.request.contextPath}/admin/userdel?pageNum=${total}">最后一页</a>
        <span>总共有${total}页</span>
    </div>
    <form action="${pageContext.request.contextPath}/admin/userdel" method="post">
        <table cellspacing="0" cellpadding="12">
            <tr>
                <td class="blue_text">用户名</td>
                <td class="blue_text">密码</td>
                <td class="blue_text">权限</td>
                <td class="blue_text">删除</td>
            </tr>

            <c:forEach items="${users}" var="user">
                <tr>
                    <td>${user.username}
                    </td>
                    <td>${user.password}
                    </td>
                    <td>${user.role.name}
                    </td>
                    <td><input type="checkbox" style="zoom: 150%" name="${user.username}"></td>
                </tr>
            </c:forEach>

            <tr>
                <td colspan="4">
                    <button>删除</button>
                </td>
            </tr>
        </table>
    </form>

    <%@ include file="../common/footer.jsp" %>
</div>
</body>
<script>

</script>
</html>
